<template>
<div>
    <v-row>
        <v-col cols="12" md="3">
            <v-text-field
            v-model="form.stu_id"
            label="学生学号"
            outlined
            ></v-text-field>
        </v-col>
        <v-col cols="12" md="3">
            <v-text-field
            v-model="form.cou_id"
            label="课程编号"
            outlined
            ></v-text-field>
        </v-col>
        <v-col cols="12" md="3">
            <v-text-field
            v-model="form.grade"
            label="成绩"
            outlined
            ></v-text-field>
        </v-col>
        <v-col cols="12" md="3">
            <v-btn color="primary" @click="submit">提交</v-btn>
        </v-col>
    </v-row>
</div>
</template>

<script>
export default {
    name: "AddCourseGrade",

    data: ()=>({
        form: {
            stu_id: "",
            cou_id: "",
            grade: 0,
        }
    }),

    methods: {
        submit() {
            this.$axios.post("/api/AddCourseGrade.php", "ajax="+JSON.stringify(this.form))
            .then((res)=>{
                console.log(res)
            })
        }
    },
}
</script>

<style>

</style>